home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 8024 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.1 KB

  1. Path: hydro.com!usenet
  2. From: Terje Mathisen <Terje.Mathisen@hda.hydro.com>
  3. Newsgroups: comp.lang.c,comp.lang.c++,comp.os.ms-windows.programmer.misc,comp.os.msdos.programmer,comp.programming
  4. Subject: Re: How to access miliseconds?
  5. Date: Sun, 18 Feb 1996 16:44:59 +0100
  6. Organization: Hydro
  7. Message-ID: <3127497B.5C7C@hda.hydro.com>
  8. References: <4fqh79$j4j@usenet.rpi.edu>
  9. NNTP-Posting-Host: 163.34.27.130
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.0 (Win95; I)
  14. CC: jester@rpi.edu
  15.  
  16. Ghost In The Machine wrote:
  17. > Hello ....
  18. > I'm working on a problem at work, where i need to
  19. > be able to generate a timestamp within the program
  20. > at a point, and have it accurate down to the millisecond.
  21. > The platform i'm using is a Zeos Pantera pentium, on
  22.  
  23. The magic word: Pentium!
  24.  
  25. You can use RDTSC directly, (hex code: 0Fh, 31h), an opcode that returns 
  26. a 64-bit value in EDX:EAX. With suitable scaling, this number is the 
  27. perfect timestamp generator!
  28.  
  29.  
  30. -Terje Mathisen (include std disclaimer) <Terje.Mathisen@hda.hydro.com>
  31. "almost all programming can be viewed as an exercise in caching"
  32.